/* eslint-disable */
// @ts-ignore
import request from '@/utils/request'
import { CustomRequestOptions } from '@/interceptors/request'

import * as API from './types'

/** 账号登录 POST /api/login/account */
export async function accountUsingPost({
  body,
  options,
}: {
  body: API.zhanghaodenglucanshu
  options?: CustomRequestOptions
}) {
  return request<API.AjaxResultxitongdengluVo>('/api/login/account', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 公众号链接 GET /api/login/codeUrl */
export async function codeUrlUsingGet({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.codeUrlUsingGETParams
  options?: CustomRequestOptions
}) {
  return request<API.AjaxResulttiaozhuanlianjieVo>('/api/login/codeUrl', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** PC扫码链接 GET /api/login/getScanCode */
export async function scanCodeUrlUsingGet({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.scanCodeUrlUsingGETParams
  options?: CustomRequestOptions
}) {
  return request<API.AjaxResulttiaozhuanlianjieVo>('/api/login/getScanCode', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 退出登录 POST /api/login/logout */
export async function logoutUsingPost({ options }: { options?: CustomRequestOptions }) {
  return request<API.AjaxResultobject>('/api/login/logout', {
    method: 'POST',
    ...(options || {}),
  })
}

/** 绑定小程序 POST /api/login/mnpAuthBind */
export async function mnpAuthBindUsingPost({
  body,
  options,
}: {
  body: API.bangdingweixinxiaochengxuhuogongzhonghao
  options?: CustomRequestOptions
}) {
  return request<API.AjaxResultobject>('/api/login/mnpAuthBind', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 微信登录 POST /api/login/mnpLogin */
export async function mnpLoginUsingPost({
  body,
  options,
}: {
  body: API.weixindenglucanshu
  options?: CustomRequestOptions
}) {
  return request<API.AjaxResultxitongdengluVo>('/api/login/mnpLogin', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 绑定微信公众号 POST /api/login/oaAuthBind */
export async function oaAuthBindUsingPost({
  body,
  options,
}: {
  body: API.bangdingweixinxiaochengxuhuogongzhonghao
  options?: CustomRequestOptions
}) {
  return request<API.AjaxResultobject>('/api/login/oaAuthBind', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 公众号登录 POST /api/login/oaLogin */
export async function oaLoginUsingPost({
  body,
  options,
}: {
  body: API.weixindenglucanshu
  options?: CustomRequestOptions
}) {
  return request<API.AjaxResultxitongdengluVo>('/api/login/oaLogin', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 注册账号 POST /api/login/register */
export async function registerUsingPost({
  body,
  options,
}: {
  body: API.zhucezhanghaocanshu
  options?: CustomRequestOptions
}) {
  return request<API.AjaxResultobject>('/api/login/register', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** PC扫码登录 POST /api/login/scanLogin */
export async function scanLoginUsingPost({
  params,
  body,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.scanLoginUsingPOSTParams
  body: API.saomadengluyanzheng
  options?: CustomRequestOptions
}) {
  return request<API.AjaxResultobject>('/api/login/scanLogin', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    params: {
      ...params,
    },
    data: body,
    ...(options || {}),
  })
}
